package com.feidee.bigdata.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Author:CHQ
 * @Date:2020/4/14 9:44
 * @Description
 */
@RestController
public class ConsumerController {
    public static final String INVODE_URL = "http://payment-consul-service/test";

    @Autowired
    private RestTemplate restTemplate;


    @RequestMapping("/test")
    public String test() {
        return restTemplate.getForObject(INVODE_URL, String.class);
    }
}
